/*
 * @Author: tcosfish
 * @Date: 2022-07-21 15:37:13
 * @LastEditors: tcosfish
 * @LastEditTime: 2022-07-21 17:21:02
 * @FilePath: \loadFile\src\config\create_xlsx\month_report.ts
 */

import { i_month_report } from "@/types/month_report.types"

const month_report: i_month_report = {
  workbook: `当月报表`,
  worksheets: [
    {
      sheet_name: `1. 资产负债表`,
      data_source: `新会计准则资产负载表.表页1`,
      tables: [
        {
          table_name: `资产负载表块`,
          operation: `复制粘贴`,
        },
      ],
    },
    {
      sheet_name: `2. 损益表`,
      data_source: `新会计准则利润表块.表页_1`,
      tables: [
        {
          table_name: `损益表`,
          fill_cols: [`项目`, `本月金额`], // 根据对应项目对应的本期金额填写
        },
      ],
    },
    {
      sheet_name: `3. 科目余额表`,
      data_source: `科目余额表.科目余额表`,
      tables: [
        {
          table_name: `库存现金表块`,
          fill_cols: [`科目名称`, `期末借方余额`],
          start_line_index: `科目代码 1001`,
        },
        {
          table_name: `应收账款表块`,
          fill_cols: [`科目名称`, `期末借方余额`],
          start_line_index: `科目代码 1122`,
        },
        {
          table_name: `预付账款表块`,
          fill_cols: [`科目名称`, `期末借方余额`],
          start_line_index: `科目代码 1123`,
        },
        {
          table_name: `其他应收款表块`,
          fill_cols: [`科目名称`, `期末借方余额`],
          start_line_index: `科目代码 1221`,
        },
        {
          table_name: `应付账款表块`,
          fill_cols: [`科目名称`, `期末借方余额`],
          start_line_index: `科目代码 2202`,
        },
        {
          table_name: `其他应付款表块`,
          fill_cols: [`科目名称`, `期末贷方月余额`],
          start_line_index: `科目代码 2241`,
        },
        {
          table_name: `长期借款表块`,
          fill_cols: [`科目名称`, `期末贷方余额`],
          start_line_index: `科目代码 2501`,
        },
      ],
      tables_options: {
        null_line: 3,
        show_sum: true,
      },
    },
    {
      sheet_name: `4. 当月预算表`,
      data_source: `科目余额表, 当月预算`,
      tables: [
        {
          table_name: `当月预算表块`,
          fill_cols: [`项目`, `金额`],
          start_line_index: `001`,
        },
      ],
    },
    {
      sheet_name: `5. 成本明细表`,
      data_source: `科目余额表.科目余额表`,
      tables: [
        {
          table_name: `主营业务成本明细表块`,
          fill_cols: [`科目名称`, `本期借方发生额`],
          start_line_index: `科目代码 6401`,
        },
        {
          table_name: `销售费用明细表块`,
          fill_cols: [`科目名称`, `本期借方发生额`],
          start_line_index: `科目代码 6601`,
        },
        {
          table_name: `管理费用明细表块`,
          fill_cols: [`科目名称`, `本期借方发生额`],
          start_line_index: `科目代码 6602`,
        },
      ],
    },
    {
      sheet_name: `6. 资金动态`,
      data_source: `科目余额表`,
      tables: [
        {
          table_name: `资金动态表块`,
          fill_cols: [`项目`, `金额`],
          start_line_index: `001`,
        },
      ],
    },
  ],
}

export default month_report
